<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=utf-8" />
<title>Class: Ensembl::Core::DBConnection</title>
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '../..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="../../_index.html">Index (D)</a> &raquo; 
    <span class='title'><span class='object_link'><a href="../../Ensembl.html" title="Ensembl (module)">Ensembl</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Core.html" title="Ensembl::Core (module)">Core</a></span></span>
     &raquo; 
    <span class="title">DBConnection</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Ensembl::Core::DBConnection
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName"><span class='object_link'><a href="../DBRegistry/Base.html" title="Ensembl::DBRegistry::Base (class)">DBRegistry::Base</a></span></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">ActiveRecord::Base</li>
          
            <li class="next"><span class='object_link'><a href="../DBRegistry/Base.html" title="Ensembl::DBRegistry::Base (class)">DBRegistry::Base</a></span></li>
          
            <li class="next">Ensembl::Core::DBConnection</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/ensembl/db_connection.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>
The Ensembl::Core::DBConnection is the actual connection established with
the Ensembl server.
</p>


  </div>
</div>
<div class="tags">
  
</div><div id="subclasses">
  <h2>Direct Known Subclasses</h2>
  <p class="children"><span class='object_link'><a href="Analysis.html" title="Ensembl::Core::Analysis (class)">Analysis</a></span>, <span class='object_link'><a href="AnalysisDescription.html" title="Ensembl::Core::AnalysisDescription (class)">AnalysisDescription</a></span>, <span class='object_link'><a href="AssemblyException.html" title="Ensembl::Core::AssemblyException (class)">AssemblyException</a></span>, <span class='object_link'><a href="AssemblyLink.html" title="Ensembl::Core::AssemblyLink (class)">AssemblyLink</a></span>, <span class='object_link'><a href="AttribType.html" title="Ensembl::Core::AttribType (class)">AttribType</a></span>, <span class='object_link'><a href="CoordSystem.html" title="Ensembl::Core::CoordSystem (class)">CoordSystem</a></span>, <span class='object_link'><a href="DensityFeature.html" title="Ensembl::Core::DensityFeature (class)">DensityFeature</a></span>, <span class='object_link'><a href="DensityType.html" title="Ensembl::Core::DensityType (class)">DensityType</a></span>, <span class='object_link'><a href="Dna.html" title="Ensembl::Core::Dna (class)">Dna</a></span>, <span class='object_link'><a href="DnaAlignFeature.html" title="Ensembl::Core::DnaAlignFeature (class)">DnaAlignFeature</a></span>, <span class='object_link'><a href="Exon.html" title="Ensembl::Core::Exon (class)">Exon</a></span>, <span class='object_link'><a href="ExonStableId.html" title="Ensembl::Core::ExonStableId (class)">ExonStableId</a></span>, <span class='object_link'><a href="ExonSupportingFeature.html" title="Ensembl::Core::ExonSupportingFeature (class)">ExonSupportingFeature</a></span>, <span class='object_link'><a href="ExonTranscript.html" title="Ensembl::Core::ExonTranscript (class)">ExonTranscript</a></span>, <span class='object_link'><a href="ExternalDb.html" title="Ensembl::Core::ExternalDb (class)">ExternalDb</a></span>, <span class='object_link'><a href="ExternalSynonym.html" title="Ensembl::Core::ExternalSynonym (class)">ExternalSynonym</a></span>, <span class='object_link'><a href="Gene.html" title="Ensembl::Core::Gene (class)">Gene</a></span>, <span class='object_link'><a href="GeneAttrib.html" title="Ensembl::Core::GeneAttrib (class)">GeneAttrib</a></span>, <span class='object_link'><a href="GeneStableId.html" title="Ensembl::Core::GeneStableId (class)">GeneStableId</a></span>, <span class='object_link'><a href="GoXref.html" title="Ensembl::Core::GoXref (class)">GoXref</a></span>, <span class='object_link'><a href="Karyotype.html" title="Ensembl::Core::Karyotype (class)">Karyotype</a></span>, <span class='object_link'><a href="Map.html" title="Ensembl::Core::Map (class)">Map</a></span>, <span class='object_link'><a href="Marker.html" title="Ensembl::Core::Marker (class)">Marker</a></span>, <span class='object_link'><a href="MarkerFeature.html" title="Ensembl::Core::MarkerFeature (class)">MarkerFeature</a></span>, <span class='object_link'><a href="MarkerMapLocation.html" title="Ensembl::Core::MarkerMapLocation (class)">MarkerMapLocation</a></span>, <span class='object_link'><a href="MarkerSynonym.html" title="Ensembl::Core::MarkerSynonym (class)">MarkerSynonym</a></span>, <span class='object_link'><a href="Meta.html" title="Ensembl::Core::Meta (class)">Meta</a></span>, <span class='object_link'><a href="MetaCoord.html" title="Ensembl::Core::MetaCoord (class)">MetaCoord</a></span>, <span class='object_link'><a href="MiscAttrib.html" title="Ensembl::Core::MiscAttrib (class)">MiscAttrib</a></span>, <span class='object_link'><a href="MiscFeature.html" title="Ensembl::Core::MiscFeature (class)">MiscFeature</a></span>, <span class='object_link'><a href="MiscFeatureMiscSet.html" title="Ensembl::Core::MiscFeatureMiscSet (class)">MiscFeatureMiscSet</a></span>, <span class='object_link'><a href="MiscSet.html" title="Ensembl::Core::MiscSet (class)">MiscSet</a></span>, <span class='object_link'><a href="ObjectXref.html" title="Ensembl::Core::ObjectXref (class)">ObjectXref</a></span>, <span class='object_link'><a href="OligoArray.html" title="Ensembl::Core::OligoArray (class)">OligoArray</a></span>, <span class='object_link'><a href="OligoFeature.html" title="Ensembl::Core::OligoFeature (class)">OligoFeature</a></span>, <span class='object_link'><a href="OligoProbe.html" title="Ensembl::Core::OligoProbe (class)">OligoProbe</a></span>, <span class='object_link'><a href="PredictionExon.html" title="Ensembl::Core::PredictionExon (class)">PredictionExon</a></span>, <span class='object_link'><a href="PredictionTranscript.html" title="Ensembl::Core::PredictionTranscript (class)">PredictionTranscript</a></span>, <span class='object_link'><a href="ProteinAlignFeature.html" title="Ensembl::Core::ProteinAlignFeature (class)">ProteinAlignFeature</a></span>, <span class='object_link'><a href="ProteinFeature.html" title="Ensembl::Core::ProteinFeature (class)">ProteinFeature</a></span>, <span class='object_link'><a href="RegulatoryFactor.html" title="Ensembl::Core::RegulatoryFactor (class)">RegulatoryFactor</a></span>, <span class='object_link'><a href="RegulatoryFeature.html" title="Ensembl::Core::RegulatoryFeature (class)">RegulatoryFeature</a></span>, <span class='object_link'><a href="RepeatConsensus.html" title="Ensembl::Core::RepeatConsensus (class)">RepeatConsensus</a></span>, <span class='object_link'><a href="RepeatFeature.html" title="Ensembl::Core::RepeatFeature (class)">RepeatFeature</a></span>, <span class='object_link'><a href="SeqRegion.html" title="Ensembl::Core::SeqRegion (class)">SeqRegion</a></span>, <span class='object_link'><a href="SeqRegionAttrib.html" title="Ensembl::Core::SeqRegionAttrib (class)">SeqRegionAttrib</a></span>, <span class='object_link'><a href="SimpleFeature.html" title="Ensembl::Core::SimpleFeature (class)">SimpleFeature</a></span>, <span class='object_link'><a href="Transcript.html" title="Ensembl::Core::Transcript (class)">Transcript</a></span>, <span class='object_link'><a href="TranscriptAttrib.html" title="Ensembl::Core::TranscriptAttrib (class)">TranscriptAttrib</a></span>, <span class='object_link'><a href="TranscriptStableId.html" title="Ensembl::Core::TranscriptStableId (class)">TranscriptStableId</a></span>, <span class='object_link'><a href="TranscriptSupportingFeature.html" title="Ensembl::Core::TranscriptSupportingFeature (class)">TranscriptSupportingFeature</a></span>, <span class='object_link'><a href="Translation.html" title="Ensembl::Core::Translation (class)">Translation</a></span>, <span class='object_link'><a href="TranslationAttrib.html" title="Ensembl::Core::TranslationAttrib (class)">TranslationAttrib</a></span>, <span class='object_link'><a href="TranslationStableId.html" title="Ensembl::Core::TranslationStableId (class)">TranslationStableId</a></span>, <span class='object_link'><a href="Xref.html" title="Ensembl::Core::Xref (class)">Xref</a></span></p>
</div>


  
  
  
  
  

  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#connect-class_method" title="connect (class method)">+ (Object) <strong>connect</strong>(species, release = Ensembl::ENSEMBL_RELEASE, args = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
The Ensembl::Core::DBConnection#connect method makes the connection to the
Ensembl core database for a given species.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#ensemblgenomes_connect-class_method" title="ensemblgenomes_connect (class method)">+ (Object) <strong>ensemblgenomes_connect</strong>(species, release = Ensembl::ENSEMBL_RELEASE, args = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../DBRegistry/Base.html" title="Ensembl::DBRegistry::Base (class)">DBRegistry::Base</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="../DBRegistry/Base.html#generic_connect-class_method" title="Ensembl::DBRegistry::Base.generic_connect (method)">generic_connect</a></span>, <span class='object_link'><a href="../DBRegistry/Base.html#get_info-class_method" title="Ensembl::DBRegistry::Base.get_info (method)">get_info</a></span>, <span class='object_link'><a href="../DBRegistry/Base.html#get_name_from_db-class_method" title="Ensembl::DBRegistry::Base.get_name_from_db (method)">get_name_from_db</a></span></p>

  

  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="connect-class_method">
  
    + (<tt>Object</tt>) <strong>connect</strong>(species, release = Ensembl::ENSEMBL_RELEASE, args = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
The Ensembl::Core::DBConnection#connect method makes the connection to the
Ensembl core database for a given species. By default, it connects to
release 50 for that species. You <em>could</em> use a lower number, but
some parts of the API might not work, or worse: give the wrong results.
</p>


  </div>
</div>
<div class="tags">
  
  <div class="examples">
    <h3>Examples:</h3>
    
      <h4><div class='inline'></div></h4>
      <pre class="example code"><span class='comment val'># Connect to release 50 of human</span>
<span class='Ensembl constant id'>Ensembl</span><span class='colon2 op'>::</span><span class='Core constant id'>Core</span><span class='colon2 op'>::</span><span class='DBConnection constant id'>DBConnection</span><span class='dot token'>.</span><span class='connect identifier id'>connect</span><span class='lparen token'>(</span><span class='string val'>'homo_sapiens'</span><span class='rparen token'>)</span>

<span class='comment val'># Connect to release 42 of chicken</span>
<span class='Ensembl constant id'>Ensembl</span><span class='colon2 op'>::</span><span class='Core constant id'>Core</span><span class='colon2 op'>::</span><span class='DBConnection constant id'>DBConnection</span><span class='dot token'>.</span><span class='connect identifier id'>connect</span><span class='lparen token'>(</span><span class='string val'>'gallus_gallus'</span><span class='rparen token'>)</span>
</pre>
    
  </div>
<h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
        <span class='name'>species</span>
      
      
      
        &mdash;
        <div class='inline'><p>
Species to connect to. Must be in snake_case
</p>
</div>
      
    </li>
  
    <li>
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
        <span class='name'>ensembl_release.</span>
      
      
      
        &mdash;
        <div class='inline'><p>
Release to connect to (default = 60)
</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


139
140
141</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ensembl/db_connection.rb', line 139</span>

<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='connect identifier id'>connect</span><span class='lparen token'>(</span><span class='species identifier id'>species</span><span class='comma token'>,</span> <span class='release identifier id'>release</span> <span class='assign token'>=</span> <span class='Ensembl constant id'>Ensembl</span><span class='colon2 op'>::</span><span class='ENSEMBL_RELEASE constant id'>ENSEMBL_RELEASE</span><span class='comma token'>,</span> <span class='args identifier id'>args</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='generic_connect identifier id'>generic_connect</span><span class='lparen token'>(</span><span class='string val'>'core'</span><span class='comma token'>,</span><span class='species identifier id'>species</span><span class='comma token'>,</span> <span class='release identifier id'>release</span><span class='comma token'>,</span><span class='args identifier id'>args</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="ensemblgenomes_connect-class_method">
  
    + (<tt>Object</tt>) <strong>ensemblgenomes_connect</strong>(species, release = Ensembl::ENSEMBL_RELEASE, args = {}) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


143
144
145
146</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/ensembl/db_connection.rb', line 143</span>

<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='ensemblgenomes_connect identifier id'>ensemblgenomes_connect</span><span class='lparen token'>(</span><span class='species identifier id'>species</span><span class='comma token'>,</span> <span class='release identifier id'>release</span> <span class='assign token'>=</span> <span class='Ensembl constant id'>Ensembl</span><span class='colon2 op'>::</span><span class='ENSEMBL_RELEASE constant id'>ENSEMBL_RELEASE</span><span class='comma token'>,</span> <span class='args identifier id'>args</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
  <span class='args identifier id'>args</span><span class='lbrack token'>[</span><span class='symbol val'>:ensembl_genomes</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='true true kw'>true</span>
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='generic_connect identifier id'>generic_connect</span><span class='lparen token'>(</span><span class='string val'>'core'</span><span class='comma token'>,</span><span class='species identifier id'>species</span><span class='comma token'>,</span><span class='release identifier id'>release</span><span class='comma token'>,</span><span class='args identifier id'>args</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Wed Dec 15 19:18:15 2010 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.6.3 (ruby-1.8.7).
</div>

  </body>
</html>